home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Visual Database / Visual dBase v5.5 / MUSIC1.PAK / CONFIGS.WFM < prev    next >
Encoding:
Text File  |  1995-07-18  |  6.0 KB  |  209 lines

  1. *******************************************************************************
  2. *  PROGRAM:      Configs.wfm
  3. *
  4. *  WRITTEN BY:   Borland Samples Group
  5. *
  6. *  DATE:         1/94
  7. *
  8. *  UPDATED:      5/95
  9. *
  10. *  REVISION:     $Revision:   1.32  $
  11. *
  12. *  VERSION:      Visual dBASE
  13. *
  14. *  DESCRIPTION:  This is a form showing all the available media on which items
  15. *                sold in the Musical Methods record store are recorded.  You
  16. *                may view only a list of the available media, or you may choose
  17. *                to view all the available items on that media.
  18. *
  19. *  PARAMETERS:   None
  20. *
  21. *  CALLS:        Configs.qbe   (view of tables)
  22. *                Music.cc      (for custom pushbuttons)
  23. *                View.mnu      (menu file)
  24. *                View.pop      (popup file)
  25. *                Music.prg     (procedure file)
  26. *
  27. *  USAGE:        DO Configs.wfm
  28. *
  29. *******************************************************************************
  30. #include "Music.h"
  31.  
  32. create session
  33. set talk off
  34. set ldcheck off
  35.  
  36. ** END HEADER -- do not remove this line*
  37. * Generated on 06/19/94
  38. *
  39. parameter bModal
  40. local f
  41. f = new CONFIGSFORM()
  42. if (bModal)
  43.    f.mdi = .F. && ensure not MDI
  44.    f.ReadModal()
  45. else
  46.    f.Open()
  47. endif
  48. CLASS CONFIGSFORM OF FORM
  49.    Set Procedure to Music.cc additive
  50.    this.ReleaseOnClose = .F.
  51.    this.Minimize = .F.
  52.    this.MousePointer =          1
  53.    this.Maximize = .F.
  54.    this.HelpFile = "Music.hlp"
  55.    this.HelpId = "Media Types"
  56.    this.Text = "Media Types"
  57.    this.OnOpen = CLASS::ONOPEN
  58.    this.OnClose = CLASS::ONCLOSE
  59.    this.Width =         44.37
  60.    this.View = "CONFIGS.QBE"
  61.    this.Top =          3.69
  62.    this.MenuFile = "VIEW.MNU"
  63.    this.Left =         30.77
  64.    this.Height =         14.26
  65.    this.ColorNormal = "W"
  66.  
  67.    DEFINE RECTANGLE LISTRECT OF THIS;
  68.        PROPERTY;
  69.          Border .T.,;
  70.          BorderStyle          1,;
  71.          Text "",;
  72.          ColorNormal "W+/R",;
  73.          Width         41.82,;
  74.          Top          0.50,;
  75.          Left          1.19,;
  76.          Height          9.15
  77.  
  78.    DEFINE TEXT MEDIATYPESTEXT OF THIS;
  79.        PROPERTY;
  80.          Border .F.,;
  81.          Text "Media Types:",;
  82.          ColorNormal "W/R",;
  83.          Width         16.83,;
  84.          Top          0.72,;
  85.          Left          1.87,;
  86.          Height          1.01
  87.  
  88.    DEFINE MUSICBUTTON ITEMSBUTTON OF THIS;
  89.        PROPERTY;
  90.          UpBitmap "RESOURCE #108",;
  91.          HelpFile "Music.hlp",;
  92.          HelpID "Items",;
  93.          Text "&Items...",;
  94.          ColorNormal "N/W",;
  95.          StatusMessage "Show available items matching the current selection.  Press F1 for Help.",;
  96.          Width         14.11,;
  97.          Default .T.,;
  98.          Top         12.18,;
  99.          Left         13.60,;
  100.          Height          1.50
  101.  
  102.    DEFINE CLOSEMBUTTON CLOSEFORMBUTTON OF THIS;
  103.        PROPERTY;
  104.          Width         14.11,;
  105.          Top         12.18,;
  106.          Left         28.90,;
  107.          Height          1.50
  108.  
  109.    DEFINE IMAGE LOGOIMAGE OF THIS;
  110.        PROPERTY;
  111.          DataSource "FILENAME SMLMUSIC.BMP",;
  112.          Width         10.71,;
  113.          Top          9.92,;
  114.          Left          1.19,;
  115.          Height          4.04,;
  116.          Alignment          2
  117.  
  118.    DEFINE LISTBOX DESCRIPTLIST OF THIS;
  119.        PROPERTY;
  120.          Visible .F.,;
  121.          ColorHighLight "W+/R",;
  122.          ColorNormal "N/W+",;
  123.          Width         40.29,;
  124.          Top          1.67,;
  125.          Left          2.04,;
  126.          ID        800,;
  127.          Height          7.54
  128.  
  129.    ****************************************************************************
  130.    PROCEDURE OnOpen
  131.    ****************************************************************************
  132.  
  133.    if _app.framewin.text = "Musical Methods"  && If called from Music.prg
  134.       EnableViews(this)                       && enable viewing other items.
  135.       trackWindows.AddWindow(form)            && Keep track of open windows
  136.  
  137.    else                                       && otherwise
  138.       set procedure to Music.prg additive     && Make Music.prg procedure file
  139.    endif
  140.  
  141.    *** Define corresponding items (initially not visible)
  142.    DefineCorrespondingItems(form)
  143.  
  144.    *** View Window Settings
  145.    this.OnSize = SizeForm                     && Procedure in music.prg
  146.  
  147.    *** Assign the SpeedMenu for this form
  148.    set procedure to View.pop additive
  149.    this.popupMenu = new ViewPopup(this, "ViewPopup")
  150.  
  151.    *** Menu Settings
  152.    this.root.view.organization.enabled = .F.
  153.    this.root.view.organization.rank.enabled = .F.
  154.    this.root.view.organization.artist.enabled = .F.
  155.    this.root.view.organization.title.enabled = .F.
  156.    this.root.view.browse.enabled = .F.
  157.    this.popupMenu.organization.enabled = .F.
  158.    this.popupMenu.organization.rank.enabled = .F.
  159.    this.popupMenu.organization.artist.enabled = .F.
  160.    this.popupMenu.organization.title.enabled = .F.
  161.    this.popupMenu.browse.enabled = .F.
  162.    this.root.AssignWindowMenu()
  163.  
  164.  
  165.    * Link listbox to the unSKIPped list of parent records
  166.    this.descriptList.dataSource = "FIELD CONFIGS->DESCRIPT"
  167.    this.descriptList.visible = .T.            && Make it visible here so don't
  168.                                               && See flickering in form
  169.  
  170.    set skip to                                && Parent records shown only once
  171.    this.filter = ""                           && No filter is set yet
  172.  
  173.  
  174.    this.musicIsOpen = .F.                     && Corresponding items not visible
  175.                                               && yet
  176.  
  177.    this.itemsButton.OnClick = CorrespondingItems  && procedure in Music.prg
  178.  
  179.  
  180.  
  181.    ****************************************************************************
  182.    PROCEDURE OnClose
  183.    ****************************************************************************
  184.  
  185.    if _app.framewin.text = MUSIC_APP_TITLE
  186.       trackWindows.DeleteWindow(form)
  187.    else
  188.       close procedure Music.prg
  189.    endif
  190.    close procedure Music.cc, View.pop
  191.  
  192.  
  193.  
  194. ENDCLASS
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208.  
  209.